<template>
  <div class="itemBody wow fadeInLeft">
    <div class="iconLeftTop"></div>
    <div class="iconLeftBottom"></div>
    <div class="iconRightTop"></div>
    <div class="iconRightBottom"></div>
    <div class="itemBodyInner">
      <div class="iconBody">
        <i class="icon iconfont" :class="item.icon"></i>
      </div>
      <div class="listItemr">
        <div class="numBody">
          <numcard :number="item.num"></numcard>
          <span>{{ item.unit }}</span>
        </div>
        <div class="title">
          <span>{{ item.name }}</span>
        </div>

      </div>
    </div>
  </div>

</template>

<script>
import numcard from "@/components/numcard/numcard.vue";

export default {
  data() {
    return {}
  },
  components: {numcard},
  props: {
    item: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  computed: {},
  mounted() {
    var that = this;
  },
}
</script>

<style lang="scss" scoped>
.itemBody {
  width: 100%;
  position: relative;
  height: 100%;
  max-height: 80px;
  max-width: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: flex-start;

  .itemBodyInner {
    position: relative;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    display: flex;
    justify-content: flex-start;
    background: #233b58;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
    box-shadow: inset 0 0 10px 5px #233b58;
  }

  .iconLeftTop {
    background: url("../assets/icon_left_top.png");
    width: 10px;
    height: 9px;
    position: absolute;
    background-size: 100% 100%;
    top: 0;
    left: 0;
  }

  .iconRightTop {
    background: url("../assets/icon_right_top.png");
    width: 10px;
    height: 9px;
    position: absolute;
    background-size: 100% 100%;
    top: 0;
    right: 0;
  }

  .iconLeftBottom {
    background: url("../assets/icon_left_bottom.png");
    width: 10px;
    height: 9px;
    position: absolute;
    background-size: 100% 100%;
    bottom: 0;
    left: 0;
  }

  .iconRightBottom {
    background: url("../assets/icon_right_bottom.png");
    width: 10px;
    height: 9px;
    position: absolute;
    background-size: 100% 100%;
    bottom: 0;
    right: 0;
  }

  .iconBody {
    background: url("../assets/iconbgAnimate.png");
    background-size: 100% 100%;
    width: 38px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
    margin-left: 10px;
  }

  .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
    flex-shrink: 0;
    font-size: 22px;
  }

  .listItemr {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
    flex-direction: column;
    align-content: flex-start;
    width: calc(100% - 70px);
    position: relative;
    height: 100%;
    margin-left: 15px;


    .title {
      font-size: 14px;
      font-family: PingFang;
      font-weight: 500;
      color: rgba(216, 226, 255, 0.8);
    }

    :deep(.numBody) {
      height: 30px;
      position: relative;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      flex-wrap: nowrap;
      flex-direction: row;
      align-content: flex-start;

      span {
        position: relative;
        height: 100%;
        display: flex;
        margin-left: 3px;
        margin-bottom: 3px;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        flex-direction: row;
        align-content: flex-start;
      }

      .real-time-num {
        width: auto;
        font-size: 24px;
        font-family: DIN-Bold;
        font-weight: 500;
        color: #FFFFFF;
        margin-left: 0;
      }
    }
  }
}
</style>
